package com.ai.bitcoin.jpa.service.impl;

import com.ai.bitcoin.jpa.dao.BccIndexInfoCrawlDao;
import com.ai.bitcoin.jpa.entity.BccIndexInfoCrawl;
import com.ai.bitcoin.jpa.service.BccIndexInfoCrawlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author Jason
 * @date 2018/4/11
 **/
@Component
public class BccIndexInfoCrawlServiceImpl implements BccIndexInfoCrawlService {
    @Autowired
    BccIndexInfoCrawlDao dao;

    @Override
    public Page<BccIndexInfoCrawl> findByBccIdAndBatchNo(String bccId, String batchNo, Pageable pageable) {
        return dao.findByBccIdAndBatchNo(bccId, batchNo, pageable);
    }

    @Override
    public Page<BccIndexInfoCrawl> findByBatchNo(String batchNo, Pageable pageable) {
        return dao.findByBatchNo(batchNo, pageable);
    }

    @Override
    public List<BccIndexInfoCrawl> findByBccIdAndBatchNo(String bccId, String batchNo) {
        return dao.findByBccIdAndBatchNo(bccId, batchNo);
    }
}
